package com.liruan.rest.codegenerator;

public enum StaffStatus
{
	NOT_CONNECTED(0, "客服断开链接"),
	CONNECTED(1, "客服已链接"),
	SLEEP(2, "休眠状态"),
	READY_TO_WORK(3, "可接线状态"),
	HANG_OFF(4, "不接受新会话状态");

	private final int status;
	private final String desc;

	public String toString()
	{
		return this.hashCode() + "";
	}

	private StaffStatus(int status, String desc)
	{
		this.status = status;
		this.desc = desc;
	}

	public String getDesc()
	{
		return desc;
	}

	public static StaffStatus valueOf(int status)
	{
		for (StaffStatus ent : StaffStatus.values())
		{
			if (ent.status == status)
				return ent;
		}

		throw new RuntimeException("not illegal status");
	}
}
